package com.hanbang.chu_xing_gao_zhao.view_dynamic;

import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;

import com.hanbang.chu_xing_gao_zhao.base.BaseActivity;
import com.hanbang.chu_xing_gao_zhao.view_find.FindChefFragment;
import com.hanbang.chu_xing_gao_zhao.view_find.FindMainFragmentActivity;
import com.hanbang.cxgz_2.R;

/**
 * 侧出菜单
 */
public class DynamicSideslipActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.dynamic_sideslip);
        initView();
        setOnClickListener();

    }

    /**
     * 初始化view
     */
    private void initView() {

    }

    /**
     * 设置点击事件
     */
    private void setOnClickListener() {
        findViewById(R.id.dynamic_sideslip_dynamic).setOnClickListener(onClickListener);
        findViewById(R.id.dynamic_sideslip_find).setOnClickListener(onClickListener);
        findViewById(R.id.dynamic_sideslip_findChef).setOnClickListener(onClickListener);

    }

    /**
     * 处理监听
     */
    @SuppressWarnings("unused")
    private OnClickListener onClickListener = new OnClickListener() {

        @Override
        public void onClick(View v) {
            Intent intent = new Intent();
            switch (v.getId()) {
                case R.id.dynamic_sideslip_dynamic:
                    intent.setClass(DynamicSideslipActivity.this, DynamicActivity.class);
                    startActivity(intent);
                    break;
                case R.id.dynamic_sideslip_find:
                    intent.setClass(DynamicSideslipActivity.this, FindMainFragmentActivity.class);
                    intent.putExtra("type",0);
                    startActivity(intent);
                    break;
                case R.id.dynamic_sideslip_findChef:
                    intent.setClass(DynamicSideslipActivity.this, FindMainFragmentActivity.class);
                    intent.putExtra("type",0);
                    startActivity(intent);
                    break;




                default:
                    break;
            }
        }
    };

    @Override
    protected void onResume() {
        setBackArrows(findViewById(R.id.popup_left_menu));
        super.onResume();
    }

    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
    }

    @Override
    protected void onDestroy() {
        // TODO Auto-generated method stub
        super.onDestroy();
    }
}
